package com.cobra.rdd.operator.transform

import org.apache.spark.{SparkConf, SparkContext}

import java.text.SimpleDateFormat

//分区不变原理
object Spark12_RDD_Operator_Transform_GROUP_Filter {
  def main(args: Array[String]): Unit = {
    val sparkConf = new SparkConf().setMaster("local[*]").setAppName("Spark12_RDD_Operator_Transform_GROUP_Filter")
    val sc = new SparkContext(sparkConf)
    //算子获取
    val rdd = sc.makeRDD(List(1,2,3,4))
    val filterRDD = rdd.filter(_ % 2 != 0)
    filterRDD.collect().foreach(println)
    sc.stop()
  }
}
